package com.zeh.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author zeh
 * @since 2021-05-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)

public class Blog implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Boolean appreciation;
    private Boolean commentabled;
    private String content;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    private String description;

    private String firstPicture;
    private String flag;
    private Boolean published;
    private Boolean recommend;
    private Boolean shareStatement;
    private String title;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    private Integer views;
    private Long typeId;
    private Long userId;
    private Integer commentCount;
    @TableField(exist = false)
    private Type type;
    @TableField(exist = false)
    private User user;
    @TableField(exist = false)
    private List<Comment> comments = new ArrayList<>();

}
